home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1986 August / 1986-08.d64 / turbo bootmaker (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  50 lines

  1. 100 print"[147]"chr$(8)chr$(14):print tab(10)"** [212]urbo[194]ootmaker **":z$=chr$(0)
  2. 110 for ad=822 to 915:read by:ck=ck+by:poke ad,by:next:if ck=11597 then 130
  3. 120 print"[197]rror in [196][193][212][193] statements!":stop
  4. 130 print"  [201]nsert a disk containing [212]urbo[196]isk."
  5. 140 print tab(7)"[208]ress  [210][197][212][213][210][206] [146] when ready."
  6. 150 get k$:if k$<>chr$(13) then 150
  7. 160 close 15:open 15,8,15,"i0":gosub 500:if e then 600
  8. 170 t$="":print"[206]ame of [212]urbo[196]isk file:":input t$:if t$="" then 170
  9. 180 open 1,8,8,"0:"+t$+",p,r":get#1,a$,b$:gosub 500:if e then 600
  10. 190 tl=asc(a$+z$):th=asc(b$+z$):poke 834,tl:poke 836,th:poke 861,tl:poke 862,th
  11. 200 ts=49152:te=ts:print tab(7)"[210]eading: "t$
  12. 210 for ss=0 to 1:get#1,a$:ss=st:poke te,asc(a$+z$):te=te+1:next
  13. 220 close 1:if st<>64 then print"[197]rror reading [212]urbo[196]isk file.":stop
  14. 230 print" [201]nsert the disk on which you wish to":print" create the boot file."
  15. 240 print tab(7)"[208]ress  [210][197][212][213][210][206] [146] when ready."
  16. 250 get k$:if k$<>chr$(13) then 250
  17. 260 print#15,"i0":gosub500:if e then600
  18. 270 p$="":print"[206]ame of program to [212]urbo[194]oot:":input p$:if p$="" then 290
  19. 280 p=len(p$):poke 874,p:for i=1 to p:poke 899+i,asc(mid$(p$,i)):next
  20. 290 open 1,8,8,"0:"+p$+",p,r":gosub 500:close 1:if e=0 then 310
  21. 300 if e=62 then print" [210]emember to put a copy of "p$:print" on this disk."
  22. 310 printtab(5)"[201]s the program [194][193][211][201][195] or [205][204]?":printtab(9)"[208]ress  [194] [146] or  [205] [146]"
  23. 320 get k$:if k$="b" then 380
  24. 330 if k$<>"m" then 320
  25. 340 a$="":input"[211]tarting address";a$:if a$="" then 340
  26. 350 d=0:if left$(a$,1)<>"$" then d=val(a$):goto 370
  27. 360 for i=2 to len(a$):a=(asc(mid$(a$,i))and 127)-48:d=(16*d)+a+(7*(a>9)):next
  28. 370 dh=int(d/256):dl=d-(256*dh):poke 891,76:poke 892,dl:poke 893,dh
  29. 380 b$="":print"[206]ame for [212]urbo[194]ooting file:":input b$:if b$="" then 380
  30. 390 open 1,8,8,"0:"+b$+",p,w":gosub 500:if e then 600
  31. 400 print tab(7)"[215]riting: "b$
  32. 410 print#1,chr$(38);chr$(3);chr$(54);chr$(3);
  33. 420 for ad=808 to 915:print#1,chr$(peek(ad));:next
  34. 430 for ad=ts to te:print#1,chr$(peek(ad));:next
  35. 440 close 1:gosub 500:if e then 600
  36. 450 close 15:print""b$" will now turboboot "p$:end
  37. 500 input#15,e,e$:return
  38. 600 close 1:print"";
  39. 610 if e=62 then print"[206]o file with that name on this disk.":goto 170
  40. 620 if e=63 then print"[212]hat name is already used on this disk.":goto 380
  41. 630 close15:print"[196]isk [197]rror:";e;e$:end
  42. 822 data 32,138,255,169,148,160,3,133,251,132
  43. 832 data 252,169,0,160,192,133,253,132,254,160
  44. 842 data 0,177,251,145,253,200,208,249,230,252
  45. 852 data 230,254,165,254,201,196,208,239,32,0
  46. 862 data 192,32,68,229,166,186,160,1,32,186
  47. 872 data 255,169,1,162,132,160,3,32,189,255
  48. 882 data 169,0,32,213,255,134,45,132,46,32
  49. 892 data 94,166,32,142,166,76,174,167,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  50.